class AssertUtil:

    # 封装断言方法
    @classmethod
    def assert_util(cls, login_resp, status_code, success, code, message):
        assert login_resp.status_code == status_code
        assert login_resp.json().get('success') == success
        assert login_resp.json().get('code') == code
        assert login_resp.json().get('message') == message

    # tpshop断言封装
    @classmethod
    def tpshop_assert_util(cls, login_resp, status_code, status, msg):
        assert login_resp.status_code == status_code
        assert login_resp.json().get('status') == status
        assert login_resp.json().get('msg') == msg

    # 注册断言封装
    @classmethod
    def register_assert(cls, register_resp, status_code, status, msg):
        assert register_resp.status_code == status_code
        assert register_resp.json().get('status') == status
        assert register_resp.json().get('msg') == msg

    # 部门断言
    @classmethod
    def department_assert(cls, update_department_resp, status_code, status, code, message):
        assert update_department_resp.status_code == status_code
        assert update_department_resp.json().get('success') == status
        assert update_department_resp.json().get('code') == code
        assert update_department_resp.json().get('message') == message
